package com.hlkj.baojin.dao;

import com.hlkj.baojin.entity.Device;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * @author HULIN
 * @created with: baojin
 * @package com.hlkj.baojin.dao
 * @description:
 * @date 2018/12/17 12:39
 * @modified By:
 * @Copyright © 2018 HAILIANG Info. Tech Ltd. All rights reserved.
 */
public interface IDeviceDao  extends MongoRepository<Device, String> {

    Device findByIdAndDelete(String deviceId, Integer delete);
    Device findByIdAndDeleteAndStatus(String deviceId, Integer delete,Integer status);

    Device findByIndexNumAndBelongCompanyAndDelete(String indexNum, String belongCompany, Integer delete);

    Device findByIndexNumAndDelete(String indexNum, Integer delete);

    Device findByIdAndMonitorTypeAndDelete(String deviceId, Integer monitorType, Integer isNoDelete);

    List<Device> findByDelete(Integer delete);

    List<Device> findByCompanyAreaAndDelete(String companyAreaId, Integer delete);

    List<Device> findByCompanyAreaAndStatusAndDelete(String companyAreaId, Integer status, Integer delete);
}
